package com.sun.XCodeFactory;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

import com.sun.XCode.VersionRequestDecoder;
import com.sun.XCode.VersionRequestEncoder;

public class XCodeFactory implements ProtocolCodecFactory {

	public XCodeFactory(){
		
	}
	private ProtocolEncoder encoder;
    private ProtocolDecoder decoder;
    
	@Override
	public ProtocolEncoder getEncoder(IoSession paramIoSession)
			throws Exception {

		return encoder;
	}

	@Override
	public ProtocolDecoder getDecoder(IoSession paramIoSession)
			throws Exception {

		return decoder;
	}
	public ProtocolEncoder getEncoder() {
		return encoder;
	}
	public void setEncoder(ProtocolEncoder encoder) {
		this.encoder = encoder;
	}
	public ProtocolDecoder getDecoder() {
		return decoder;
	}
	public void setDecoder(ProtocolDecoder decoder) {
		this.decoder = decoder;
	}
	
	

}
